const express = require('express');
const router = express.Router();

router.get('/forCurrentUser', (req, res) => {
    const content = [];
    for(let i = 0; i < 40; i++) content.push({
        id: `${i + 1}`,
        brandCode: 'string',
        brandName: 'string',
        dealerCode: 'string',
        dealerName: 'string',
        partOrderPIId: 'dayingID',
        code: 'string',
        customerOrderCode: 'string',
        partOrderTypeName: 'string',
        partOrderPriceTerms: 1,
        paymentType: 1,
        transportType: 1,
        totalQuantity: 1,
        totalAmount: 1,
        currency: 1,
        submitTime: '2019-10-08T07:29:54.423Z',
        status: 1,
        createTime: '2019-10-08T07:29:54.423Z',
        shipmentAmount: 1,
        insuranceAmount: 1,
        stockQuantity: 120,
        stockItem: 'stockItem',
        stockMoney: 13156,
        stockCreateTime: '2019-10-08T07:29:54.423Z',
        options: [
            'printExcel',
            'printPdf',
        ]
    });
    res.json({
        message: '',
        payload: {
            content,
            totalElements: 40,
        }
    });
});
router.get('/:id', (req, res) => {
    const content = [];
    for(let i = 0; i < 10; i++) content.push({
        id: `${i + 1}`,
        partOrderPIId: 'dayingID',
        code: 'string',
        totalAmount: 1,
        partCode: 'string',
        partName: 'string',
        price: 1,
        minPackSize: 1,
        approvedQuantity: 1,
        productCategoryCode: 'string',
        options: [
            'printExcel',
            'printPdf',
        ]
    });
    res.json({
        message: '',
        payload: {
            content,
            totalElements: 10,
        }
    });
});
router.get('/export/forCurrentUser', (req, res) => {
    res.json({
        message: '导出'
    });
});
router.get('/export/forDetail', (req, res) => {
    res.json({
        message: '导出明细'
    });
});
module.exports = router;
